<!-- <template>
  <div class="app-container">
      <component  :is="parkManagementkComponent"  />
      <ParkManagementThree @loadingFinish="loadingFinish" @hideUI="hideUI" />
  </div>
</template>

<script setup name="Cockpit">
import { ref } from 'vue';
import ParkManagementThree from '@/components/ParkManagementThree';

const parkManagementkComponent = ref()
const loadingFinish = async () => {
  const component = await import('@/components/ParkManagement');
  parkManagementkComponent.value = component.default;
}
const hideUI = (value) => {
  if(value){
    loadingFinish();
  }else{
    parkManagementkComponent.value = null;
  }
}
</script>
<style scoped>
.app-container{
  padding: 0 !important;
  position: relative;
  overflow: hidden !important;
}

</style> -->
<template>
  <iframe class="iframe" :src="iframeSrc" frameborder="0"></iframe>
</template>

<script setup>

import { ref, watch, onMounted } from 'vue'
import { getToken, setToken } from '@/utils/auth';
import { getDeviceParameter } from '@/api/index';
const iframeSrc = ref('')

getDeviceParameter().then(({data}) => { 
  iframeSrc.value = data + `?route=/parkManagement&adminToken=${getToken()}`
})

</script>
<style>
.iframe{
  width:100%;
  height: 100%;
}
</style>